package cn.tedu.boot05.mapper;

import cn.tedu.boot05.entity.User;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

@Repository
@Mapper
public interface UserMapper {
    @Select("SELECT password FROM user WHERE username=#{username}")
    User selectByUsername(String username);


    @Insert("INSERT INTO user VALUES(NULL,#{username},#{password},#{nickname})")
    int insert(User user);
}
